import request from "@/utils/request";
type DATA = {
    user_id: string;
    content: string;
    food_id: String
}

enum DISCUSS {
    ADD = "/discuss",
    ADMIN = '/discuss/admin'
}

export const addidsucss = (data: DATA) => request({
    method: "POST",
    url: DISCUSS.ADD,
    data
})

export const getdiscuss = (food_id: string,) => request({
    method: "GET",
    url: DISCUSS.ADD + `/${food_id}`,

})


export const getdiscusslist = (skip = 0, Order: string, word: string) => request({
    method: 'POST',
    url: DISCUSS.ADMIN + `/${skip}/${Order}`,
    data: {
        word: word
    }
})

export const DeleteOne = (id: string) => request({
    method: 'DELETE',
    url: DISCUSS.ADD + `/${id}`
})